
import 'package:flutter/material.dart';
import 'package:flutter_sample/src/painer/circle_paint.dart';
import 'package:flutter_sample/src/painer/line_painter.dart';
import 'package:go_router/go_router.dart';

import 'bar_chart_sample5.dart';

class CustomPainterSample extends StatefulWidget {
  const CustomPainterSample({super.key});

  @override
  State<CustomPainterSample> createState() => _BarChartSampleState();
}

class _BarChartSampleState extends State<CustomPainterSample> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("CustomPainter"),
        centerTitle: true,
        leading: TextButton(onPressed: () {
          context.pop();
        }, child: Text("返回")),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            CustomPaint(
              size: Size(double.infinity, 180),
              painter: LinePainter(),

            ),
            CustomPaint(
              size: Size(double.infinity, 200),
              painter: CirclePainter(),

            )
          ],
        ),
      ),
    );
  }
}
